<?php
/**
 * Map24TrafficInfo class file
 * 
 * @author    {author}
 * @copyright {copyright}
 * @package   {package}
 */

/**
 * RequestHeader.CustomerKeyValuePair class
 */
if ( !class_exists('RequestHeaderCustomerKeyValuePair') )
{
require_once 'RequestHeader.CustomerKeyValuePair.php5';
}
/**
 * ResponseHeader class
 */
if ( !class_exists('ResponseHeader') )
{
require_once 'ResponseHeader.php5';
}
/**
 * TMCFilter class
 */
if ( !class_exists('TMCFilter') )
{
require_once 'TMCFilter.php5';
}
/**
 * Coordinate class
 */
if ( !class_exists('Coordinate') )
{
require_once 'Coordinate.php5';
}
/**
 * Bounds class
 */
if ( !class_exists('Bounds') )
{
require_once 'Bounds.php5';
}
/**
 * Progress class
 */
if ( !class_exists('Progress') )
{
require_once 'Progress.php5';
}
/**
 * TMCAreaReference class
 */
if ( !class_exists('TMCAreaReference') )
{
require_once 'TMCAreaReference.php5';
}
/**
 * TMCLinearReference class
 */
if ( !class_exists('TMCLinearReference') )
{
require_once 'TMCLinearReference.php5';
}
/**
 * TMCLocationReference class
 */
if ( !class_exists('TMCLocationReference') )
{
require_once 'TMCLocationReference.php5';
}
/**
 * CoordinatesArray class
 */
if ( !class_exists('CoordinatesArray') )
{
require_once 'CoordinatesArray.php5';
}
/**
 * Property class
 */
if ( !class_exists('Property') )
{
require_once 'Property.php5';
}
/**
 * TrafficInfo class
 */
if ( !class_exists('TrafficInfo') )
{
require_once 'TrafficInfo.php5';
}
/**
 * GetTrafficInfosResponse class
 */
if ( !class_exists('GetTrafficInfosResponse') )
{
require_once 'GetTrafficInfosResponse.php5';
}
/**
 * RequestHeader class
 */
if ( !class_exists('RequestHeader') )
{
require_once 'RequestHeader.php5';
}
/**
 * GetTrafficInfosRequest class
 */
if ( !class_exists('GetTrafficInfosRequest') )
{
require_once 'GetTrafficInfosRequest.php5';
}
/**
 * RouteViaPoint class
 */
if ( !class_exists('RouteViaPoint') )
{
require_once 'RouteViaPoint.php5';
}
/**
 * RouteSegmentDirectionHint class
 */
if ( !class_exists('RouteSegmentDirectionHint') )
{
require_once 'RouteSegmentDirectionHint.php5';
}
/**
 * RouteSegmentStreetClass class
 */
if ( !class_exists('RouteSegmentStreetClass') )
{
require_once 'RouteSegmentStreetClass.php5';
}
/**
 * RouteSegmentDescription class
 */
if ( !class_exists('RouteSegmentDescription') )
{
require_once 'RouteSegmentDescription.php5';
}
/**
 * RouteSegmentTMCHint class
 */
if ( !class_exists('RouteSegmentTMCHint') )
{
require_once 'RouteSegmentTMCHint.php5';
}
/**
 * MapCoordinatesArray class
 */
if ( !class_exists('MapCoordinatesArray') )
{
require_once 'MapCoordinatesArray.php5';
}
/**
 * Map24RouteSegmentWithTrafficInfos class
 */
if ( !class_exists('Map24RouteSegmentWithTrafficInfos') )
{
require_once 'Map24RouteSegmentWithTrafficInfos.php5';
}
/**
 * Map24RouteWithTrafficInfos class
 */
if ( !class_exists('Map24RouteWithTrafficInfos') )
{
require_once 'Map24RouteWithTrafficInfos.php5';
}
/**
 * GetTrafficInfoForMap24RouteResponse class
 */
if ( !class_exists('GetTrafficInfoForMap24RouteResponse') )
{
require_once 'GetTrafficInfoForMap24RouteResponse.php5';
}
/**
 * GetTrafficInfoForMap24RouteRequest class
 */
if ( !class_exists('GetTrafficInfoForMap24RouteRequest') )
{
require_once 'GetTrafficInfoForMap24RouteRequest.php5';
}

/**
 * Map24TrafficInfo class
 * 
 *  
 * 
 * @author    {author}
 * @copyright {copyright}
 * @package   {package}
 */
class Map24TrafficInfo {

  private $client;

  private $wsdl = null;

  /**
   *
   * @param MapTP-System the request should be executed on $server
   * @param Map24Id $mid
   * @param Map24SessionId $sid
   */ 
  public function __construct($server=null, $mid=null, $sid=null, $interface='map24/webservices1.5') {
    if($server==null || $mid==null || $sid==null){
      echo "ERROR: Not enough or invalid arguments! Unable to initialise SoapClient.";
    }
    else {
      $this->wsdl = "http://".$server."/".$interface."?wsdl=Map24TrafficInfo";
      $this->client = new SoapClient($this->wsdl, array('location' => "http://".$server."/".$interface."?soap=Map24TrafficInfo&mid=".$mid."&sid=".$sid, 'trace' => 0, 'exceptions' => 1));
    }
  }

  /**
   *  
   *
   * @param RequestHeader $RequestHeader
   * @param GetTrafficInfosRequest $GetTrafficInfosRequest
   * @return GetTrafficInfosResponse
   */
  public function getTrafficInfos(RequestHeader $RequestHeader, GetTrafficInfosRequest $GetTrafficInfosRequest) {
    return $this->client->getTrafficInfos($RequestHeader, $GetTrafficInfosRequest);
  }

  /**
   *  
   *
   * @param RequestHeader $RequestHeader
   * @param GetTrafficInfoForMap24RouteRequest $GetTrafficInfoForMap24RouteRequest
   * @return GetTrafficInfoForMap24RouteResponse
   */
  public function getTrafficInfoForMap24Route(RequestHeader $RequestHeader, GetTrafficInfoForMap24RouteRequest $GetTrafficInfoForMap24RouteRequest) {
    return $this->client->getTrafficInfoForMap24Route($RequestHeader, $GetTrafficInfoForMap24RouteRequest);
  }

}

?>
